package jse;

import org.junit.Test;

/**
 * @desc   	测试 java 对象深克隆
 * @author kanggw
 * @datetime 2016年4月12日,下午8:26:39
 */
public class Test20160412 {
	
	@Test
	public void test() {
		
		Test20160412JavaDeepClone address = new Test20160412JavaDeepClone("中国", "内蒙古", "赤峰");
		Eemployee eemployee1 = new Eemployee("康康", address);
		System.out.println("克隆前");
		System.out.println(eemployee1);
		Eemployee eemployee2 = eemployee1.clone();
		System.out.println("克隆后");
		eemployee2.setName("汪汪");
		eemployee2.getAddress().setProvince("北京");
		eemployee2.getAddress().setState("中国");;
		eemployee2.getAddress().setCity("昌平");
		System.out.println(eemployee1);
		
		System.out.println(eemployee2);
	}
	 
}

